MiniTutorial

Debugging RTSS Applications Remotely in Visual Studio

This MiniTutorial shows how to debug an RTX64 application remotely from a Target system using the familiar Microsoft Visual Studio development environment on a Host system.

Sections in this Topic:

Target Setup

Setup of the Target system requires the following steps:

Install the Remote Debugger:

  • Install the Visual Studio remote debugger tools onto the Target system. Follow the instructions available from Microsoft to determine which install you will need:

https://docs.microsoft.com/en-us/visualstudio/debugger/remote-debugging

Install the RTX64 Runtime:

For remote debugging with Visual Studio to work, the RTX64 Remote Debugger tools must be installed on the target system, no matter what version of the Visual Studio remote debugger tools is installed. If this is not already present on your system, the Runtime installer will install it for you.

Configure Remote Debugging:

For launch:

  • Configure the Visual Studio remote tools

For attach: 

  • Configure the Visual Studio remote tools
  • Configure remote debugging through the Control Panel:
  • Select Allow new remote debugging attach connections to this computer
  • Set the IP address and Port number.

Start the Subsystem:

Copy/Paste Remote Debugging Files:

  1. Navigate to C:\Program Files\IntervalZero\Common\RemoteTools.
  1. Copy these files:
  1. Navigate to C:\Program Files\Microsoft Visual Studio (2019/2017/2015)\Common7\IDE\Remote Debugger\x64, and then paste the two files into that folder.

Host Setup

Create or open the project in Visual Studio:

In this example, we'll create an RTSS application called RtssRemoteApp.

Configure the IntervalZero Remote Real-Time Debugger:

  1. With the project open in Visual Studio, select the IntervalZero Remote Real-Time Debugger from the Debugger drop-down.
  2. In the Property Pages dialog, click Configuration Properties > Debugging. Do the following:
  3. Make sure IntervalZero Remote Real-Time Debugger is selected.

  1. Set the Command line to the full local path to the binary you want to launch on the Target system. For example: C:\Debug\RtssRemoteApp.rtss.
  2. Specify any Command Arguments.
  3. Set the Remote Server Name to the name of the Target system.

NOTE: If the Remote Server Name you provide is invalid, the following error is encountered: The Microsoft Visual Studio Remote Debugging Monitor (MSVSMON.EXE) does not appear to be running on the remote computer. More appropriately, the Visual Studio Remote Debugger service on the target computer cannot connect back to this computer. The debugger is unable to resolve the specified computer name.

Debug the Target Application

IMPORTANT! The version of the Visual Studio Remote Tools installed on the Target system must exactly match the Visual Studio version on the Local system (the system running the debugger).

Start MSVSMON:

  1. On the Target system, launch the Visual Studio Remote Debugger from Start > All Programs > Visual Studio 2019/2017/2015.

  1. On the Host system, build the RtssDebug configuration of the binary you want to debug, and then copy that binary to the Command line path on the Target system that you specified in Step 2b under Host Setup.
  2. On the Host System, in Visual Studio, press F5 or Debug > Start Debugging to debug the binary on the Target system.

You should see the Host/Target connection in the Visual Studio Remote Debugging Monitor dialog.

Troubleshooting

If there are any problems connecting the host and target systems:

NOTE: Visual Studio may close and restart if the connection is lost during remote debugging.

Topics:

MiniTutorials: